package com.bjc2.proxy.jdk_proxy;

public class Client {

    public static void main(String[] args) {
        //获取代理对象
        //1.创建代理工厂对象
        ProxyFactory factory = new ProxyFactory();
        //2使用factory对象的方法获取代理对象
        SellTickets proxyObject = factory.getProxyObject();
        //3调用卖票方法
        proxyObject.sell();
        System.out.println(proxyObject.getClass());

        //让程序一直运行
//        while (true){}
    }
}
